package com.learn.injection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * A 引用 B static方法实验
 * @author chenxin
 * @time 2016-11-13-12:37
 */
public class ServiceFoo {
    @Autowired
    private static ServiceBar serviceBar;

    public static void testCallBar(){
        System.out.println("call bar");
        serviceBar.callee();
    }

    public void setServiceBar(ServiceBar serviceBar) {
        ServiceFoo.serviceBar = serviceBar;
    }
}
